package com.hlhj.funlike_business.presenter;

import android.content.Context;

import com.example.mymvp.mvp.BasePresenter;
import com.hlhj.funlike_business.bean.ShopPhotoBean;
import com.hlhj.funlike_business.bean.UpImgBean;
import com.hlhj.funlike_business.bean.UpImgBean1;
import com.hlhj.funlike_business.moudle.PhotoMoudle;
import com.hlhj.funlike_business.views.PhotoView;

import java.io.File;
import java.security.PublicKey;
import java.util.List;

public class PhotoPresenter extends BasePresenter<PhotoMoudle,PhotoView> implements PhotoMoudle.getPhoto {
    @Override
    public void createModule() {
        module = new PhotoMoudle();
        module.setListener(this);
    }

    public void LoadPhoto(Context context){
        module.LoadPhoto(context);
    }

    public void LoadQualifaction(Context context){
        module.LoadQualifactionAblums(context);
    }

    public void LoadUpImgResult(Context context, File image){
        module.LoadUpImgResult(context,image);
    }

    //slide_id	2店家资质相片 3 推广图片
    public void LoadDeLImg(Context context,int id,int slide_id){
        module.LoadDelImg(context,id,slide_id);
    }

    public void UpQualificationImg(Context context,File shop){
        module.LoadUpQualificationImg(context,shop);
    }
    @Override
    public void loadPhoto(List<ShopPhotoBean.DataBean> dataBeans) {
        getView().showPhoto(dataBeans);
    }

    @Override
    public void loadUpImgResult(UpImgBean1.DataBean dataBean) {
        getView().showUpImgResult(dataBean);
    }

    @Override
    public void loadDelResult(String msg) {
        getView().showDelResult(msg);
    }


}
